// 打開紙幣投幣串口

export const zbSerialPort = uni.requireNativePlugin('Fvv-UniSerialPort');

export const openZBSerialPort = async (url,baudRate)=>{
	await zbSerialPort.setPath(url)
	await zbSerialPort.setBaudRate(baudRate)
	await zbSerialPort.open(res=>{
		if(!res.status){
			uni.showToast({
				title:res,
				icon:'none',
				duration:5000,
			})
			return
		}
	})
}

